﻿@model IEnumerable<EADCA3MVCApp.Models.CloudService>

@{
    ViewBag.Title = "CalculateSaving";
    }

<h2>You could save up to:</h2>

<fieldset>
<legend>You could Save:</legend>
<div class="display-label-saving"> @Html.Display("Saving")</div>
</fieldset>
<fieldset>
<legend>Our recommended Cloud Service for you is:</legend>
<div class="display-label">Recommeded Provider: <div class="display-field">@Html.Display("Provider")</div></div>
<div class="display-label">Recommended Instance or Server Size: <div class="display-field">@Html.Display("InstanceSize")</div></div>
<div class="display-label">Total Monthly Cost: <div class="display-field">€@Html.Display("TotalCost") </div></div>
</fieldset>
<fieldset>
<legend>Available Services</legend>
<br />
<table>
    <tr>
        <th>
            Company:
        </th>
        <th>
            Sevice Size:
        </th>
        <th>
            Monthly Cost<br />
            per Instance
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Company)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.InstanceSize)
        </td>
        <td>
            €@Html.DisplayFor(modelItem => item.MonthlyCost)
        </td> 
        <td>
            <a href="@item.CompanyURL" target="_blank"/>Sign Up Now!
        </td>    
    </tr>
}

</table>
</fieldset>

<p>
    @Html.ActionLink("Calculate Another", "ExistingServer", "Cloud")
</p>